package org.rox.hephantan.bai4;

import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;

public class Server extends UnicastRemoteObject implements IServer {
	private String stringState;
	public Server() throws RemoteException {
		
	}
	@Override
	public String getString() {
		return stringState;
	}

	@Override
	public void setString(String s) {
		stringState = s;
	}
	public static void main(String[] args) throws RemoteException, MalformedURLException {		
			Server server = new Server();
			Naming.rebind("rmi://localhost/Server", server);		
	}
}
